package com.vcs.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;

@Entity
@Table(name = "clients")
@SuppressWarnings("serial")
public class Client implements java.io.Serializable {

	// Acccount information
	private Long id = 0L;
	private String username;
	private String password;
	// TODO confirm password field to be added
	
	// contact person's information
	private String contactPerson;
	private String designation;
	private String email;
	private long phone;
	private long mobile;
	
	// Company Information
	private String companyName;
	private String companyProfile;
	private int industryType;

	// Contact Information
	private String address;
	private int city;
	private int pincode;
	private int country;
	
	// type of client (Admin/client)
	private String role;
	private String accountType;

	// metadata
	private String profileState;
	private java.util.Date createdDate;
	private java.util.Date updateDate;
	
	
	// Constructor
	public Client() {
		
	}

	@Id
	@GeneratedValue
	@Column(name = "client_id")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@RequiredFieldValidator(message="Username is required...")
	@Column(name = "USERNAME")
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "PASSWORD")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	

	@Column(name = "COMPANY_NAME")
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	@Column(name = "COMPANY_PROFILE")
	public String getCompanyProfile() {
		return companyProfile;
	}

	public void setCompanyProfile(String companyProfile) {
		this.companyProfile = companyProfile;
	}
	
	@Column(name = "INDUSTRY_TYPE")
	public int getIndustryType() {
		return industryType;
	}

	public void setIndustryType(int industryType) {
		this.industryType = industryType;
	}

	@Column(name = "CONTACT_PERSON_NAME")
	public String getContactPerson() {
		return contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}
	
	@Column(name = "designation")
	public String getDesignation() {
		return designation;
	}

	public void setDesignation(String designation) {
		this.designation = designation;
	}
	
	@Column(name = "EMAIL")
	public String getEmail() {
		return email;
	}

	@Column(name = "PHONE")
	public long getPhone() {
		return phone;
	}

	public void setPhone(long phone) {
		this.phone = phone;
	}
	
	@Column(name = "MOBILE")
	public long getMobile() {
		return mobile;
	}
	public void setMobile(long mobile) {
		this.mobile = mobile;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "COMPANY_ADDRESS")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "COUNTRY")
	public int getCountry() {
		return country;
	}

	public void setCountry(int country) {
		this.country = country;
	}

	@Column(name = "CITY")
	public int getCity() {
		return city;
	}

	public void setCity(int city) {
		this.city = city;
	}

	@Column(name = "PINCODE")
	public int getPincode() {
		return pincode;
	}

	public void setPincode(int pincode) {
		this.pincode = pincode;
	}

	@Column(name = "ROLE")
	public String getRole() {
		return role;
	}

	public void setRole(String type) {
		this.role = type;
	}
	
	@Column(name = "ACCOUNT_TYPE")
	public String getAccountType() {
		return accountType;
	}
	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}

	@Column(name = "PROFILE_STATE")
	public String getProfileState() {
		return profileState;
	}

	public void setProfileState(String profileState) {
		this.profileState = profileState;
	}
	
	@Column(name = "created_date")
	@Type(type="timestamp")
	public java.util.Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}

	@Column(name = "update_date")
	@Type(type="timestamp")
	public java.util.Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(java.util.Date updateDate) {
		this.updateDate = updateDate;
	}
	
}
